﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kovan.DAL.UserCenter;
using Kovan.Model.Entity.UserCenter;

namespace Kovan.BLL.UserCenter
{

    public class BActUser
    {
        DActUser dal = new DActUser();

        #region 当前类的实例
        private static readonly BActUser Instances = new BActUser();

        private BActUser() { }

        public static BActUser GetInstances()
        {
            return Instances;
        }
        #endregion

        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        public act_user GetModel(long id)
        {
            return dal.GetModel(id);
        }

        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="loginName"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public act_user GetModel(string loginName, string pwd)
        {
            return dal.GetModel(loginName, pwd);
        }

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model">实体</param>
        /// <returns></returns>
        public int Add(act_user model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        public int Delete(long id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int BatchDelete(IEnumerable<string> ids)
        {
            return dal.BatchDelete(ids);
        }

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model">实体</param>
        /// <returns></returns>
        public int Update(act_user model)
        {
            return dal.Update(model);
        }
    }
}
